﻿<UserControl x:Class="TelescopeScripting.Controls.CreateCatalogControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" >
    <Grid Background="#FF706767">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition Width="40"/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>
        <ListBox Name="SearchList" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2" Width="500" Height="300"  Background="#FF1D1D1D" Foreground="White" Margin="3" BorderThickness="0">
            <ListBox.ItemTemplate>
                <ItemContainerTemplate>
                    <Border CornerRadius="3" BorderBrush="AliceBlue" BorderThickness="0" Background="#FF212121" Width="Auto">
                        <TextBlock Text="{Binding}" Foreground="LightBlue" VerticalAlignment="Center" Padding="3"/>
                    </Border>
                </ItemContainerTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <ComboBox Name="CatalogCombo" Grid.Row="4" Width="150" SelectionChanged="CatalogCombo_SelectionChanged_1" HorizontalAlignment="Right" />
        <TextBox Name="SearchBox" Grid.Column="1" Grid.Row="4" Width="150" ToolTip="Type a pattern you wish to match" 
                 TextChanged="SearchBox_TextChanged_1" HorizontalAlignment="Left"/>
        
        <Button Name="AddObject" Grid.Column="2" Click="AddObject_Click_1"  Width="35" ToolTip="Add Selected">
            <Image Source="/TelescopeScripting;component/Resources/up7.png" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="90"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Button>
        <Button Name="AddAllObjects" Grid.Column="2" Grid.Row="2" Click="AddAllObjects_Click_1" ToolTip="Add All" Width="35">
            <Image Source="/TelescopeScripting;component/Resources/_double-arrow-right-128.png" />
        </Button>
        <Button Name="RemoveObject" Grid.Column="2" Grid.Row="1" Click="RemoveObject_Click_1" ToolTip="Remove" Width="35">
            <Image Source="/TelescopeScripting;component/Resources/up7.png" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="270"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Button>
        <Button Name="RemoveAllButton" Grid.Column="2" Grid.Row="3" ToolTip="Remove All" Width="35" Click="RemoveAllButton_Click_1">
            <Image Source="/TelescopeScripting;component/Resources/_double-arrow-right-128.png" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="180"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Button>
        
        <Button Name="UpButton" Click="UpButton_Click_1" Grid.Column="5" Grid.Row="1" ToolTip="Move selected item up" Width="35">
            <Image Source="/TelescopeScripting;component/Resources/up7.png"/>
        </Button>
        <Button Name="DownButton" Click="DownButton_Click_1" Grid.Column="5" Grid.Row="2" ToolTip="Move selected item down" Width="35">
            <Image Source="/TelescopeScripting;component/Resources/up7.png" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="180"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Button>

        <ListBox Name="PlayList" Grid.Column="3" Grid.ColumnSpan="2" Grid.RowSpan="4" Width="300" Height="300"  Background="#FF1D1D1D" Foreground="White" Margin="3" BorderThickness="0">
            <ListBox.ItemTemplate>
                <ItemContainerTemplate>
                    <Border CornerRadius="3" BorderBrush="AliceBlue" BorderThickness="0" Background="#FF212121" Width="Auto">
                        <TextBlock Text="{Binding}" Foreground="LightBlue" VerticalAlignment="Center" Padding="3"/>
                    </Border>
                </ItemContainerTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <TextBox Name="CataLogName" Grid.Column="3" Grid.Row="4" ToolTip="Create a name for your new catalog" TextChanged="CataLogName_TextChanged_1"/>
        <Button Name="CreatePlayList" Grid.Column="4" Grid.Row="4" Click="CreatePlayList_Click_1" Content="Create..."/>
    </Grid>
</UserControl>
